
# salt  --summary  "*"  state.sls  install.zabbix.agent-update

zabbix-scripts-update:
  file.recurse:
    - name:  /etc/zabbix/zabbix_agentd.d
    - source: salt://files/zabbix/zabbix_agentd.d
    - user: zabbix
    - group: zabbix
    - dir_mode: 755
    - file_mode: 740
    - backup: minion
    - makedirs:  True
    - include_enpty: True
  cmd.run:
    - name: chmod +x *.sh;chmod +x *.py;chmod +s /bin/netstat
    - unless: test -d  /etc/zabbix/zabbix_agentd.d/

zabbix-service:
  service.running:
    - name: zabbix-agent
    - enable: True
    - reload: True

zubbix-agent-sudoer:
  file.append:
    - name: /etc/sudoers
    - text:
      - "Defaults:zabbix    !requiretty"
      - "zabbix ALL=(ALL)    NOPASSWD: /bin/netstat"
